function initGameMenu() {
	$s('#game_menu #launch_game').addEventListener('touchstart', function() {
		game.STATE = 'GAME';
	});
	$s('#game_menu #launch_game').addEventListener('click', function() {
		game.STATE = 'GAME';
	});

	$s('#game_menu #score_board').addEventListener('touchstart', function() {
		game.STATE = 'SCORES';
	});
	$s('#game_menu #score_board').addEventListener('click', function() {
		game.STATE = 'SCORES';
	});
}

function initHighScoresMenu() {
	$s('#game_scores #go_back').addEventListener('touchstart', function() {
		game.STATE = 'MENU';
	});
	$s('#game_scores #go_back').addEventListener('click', function() {
		game.STATE = 'MENU';
	});

	$s('#game_scores #reset').addEventListener('touchstart', function() {
		localStorage.clear();
		initHighScoresMenu();
	});
	$s('#game_scores #reset').addEventListener('click', function() {
		localStorage.clear();
		initHighScoresMenu();
	});

	var scores = db.getScores();

	clearTable('scores');

	if (scores.length > 0) {
		$s('#scores').innerHTML = '<tr><th>Name</th><th>Score</th><th>Time</th></tr>';
		for (var i = 0; i < scores.length && i < 10; i++) {
			addRow('scores', scores[i]);
		};
	}
	else {
		$s('#scores').innerHTML = '<tr><td class="no-result">There is no high scores.</td></tr>';
	}
}